home *** CD-ROM | disk | FTP | other *** search
- #include <genstub.c>
-
- LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
- {
- switch (uMsg)
- {
- case WM_COMMAND: // Process menu options.
- switch ( LOWORD( wParam ) )
- {
- case IDM_TEST: // Show results of GetTickCount()
- { // and GetCurrentTime() in a message box.
- TCHAR szBuffer[65];
- wsprintf( szBuffer,
- "GetTickCount: %lu. GetCurrentTime: %lu",
- GetTickCount( ), GetCurrentTime( ) );
- MessageBox( hWnd, szBuffer,
- "GetTickCount() Example", MB_OK );
- }
- break;
- case IDM_EXIT:
- DestroyWindow( hWnd );
- break;
- }
- break;
- case WM_DESTROY:
- PostQuitMessage( 0 );
- break;
- default:
- return (DefWindowProc(hWnd, uMsg, wParam, lParam));
- }
- return (NULL);
- }